package com.example.sht37.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
@Data
@TableName(value = "emp")
public class Emp implements Serializable {
    @TableId(value = "empNo",type = IdType.AUTO)
    private Integer empno;
    private String ename;
    private String job;
    private Integer mgr;
    private Data hiredate;
    //不要使用double float 因为他会产生精度丢失问题
    private BigDecimal sal;
    private BigDecimal comm;
    private Integer deptno;
    //关联的部门对象 多对一
    @TableField(exist = false)
    private Dept dept;
}

